************************************************************************************************************************
*											 Reproduction code for: 												   *
**************** Voting for the Bündnis Sahra Wagenknecht (BSW) from a Policy Space Perspective, Study I ***************
************************************** Nils Steiner & Sven Hillen ******************************************************
********************************************* German Politics **********************************************************
************************************************************************************************************************

/*
Instructions:
This do-file reproduces all findings reported in Study I of the article listed above.
To reproduce the findings, do the following
1. Install ados and graph schemes used (if necessary), as follows
	ssc install fre
	ssc install esttab
	ssc install schemepack, replace all
2. Download dataset & auxiliary do-file used:
	a) GLES Tracking March 2024, T57: https://doi.org/10.4232/1.14315
	b) GLES do-file for recoding missings
3. Put the dataset, auxiliary do-file, and this do-file into one folder (and set this as the working directory)
4. Run the code below on the dataset
*/


*** set working directory



** # Bookmark #1
************************************************************************************************************************
*************************************************** General Settings ***************************************************
************************************************************************************************************************
	clear all
	set more off, perm
	version 18.0
	set scheme white_tableau
	graph set window fontface "Times New Roman"

	
	
**# Bookmark #2
************************************************************************************************************************
********************************************** Open and Recode GLES Tracking data **************************************
************************************************************************************************************************

***** open GLES Tracking data	
use "ZA7715_v1-0-0.dta" 


***** recode missings with GLES do-file
do "ZA7715_missing.do"


***** set as survey data
svyset _n [pweight=wei_mzz], vce(linearized) singleunit(missing)


***** Dependent variables

	*** Voting intention
		fre t8ba
		svy: tab t8ba
		
		recode t8ba (1/322 801=0 "other") (392=1 "BSW"), gen(bswvote)
		label variable bswvote "Voting intention: BSW"
			
		label define T8BA 6 "Greens", modify
		label define T8BA 7 "The Left", modify
		label define T8BA 801 "other party", modify
		label values t8ba T8BA
	
		clonevar Wahlabsicht=t8ba

		clonevar Wahlabsicht_woothers=Wahlabsicht
		replace Wahlabsicht_woothers=. if Wahlabsicht_woothers==801
		
	*** Party Ratings: BSW
		fre t14m
		gen bswrating = t14m-6
			label define rating 0 "bad" 10 "good"
			label values bswrating rating
			label variable bswrating "Rating: BSW"
		
		
	***	Table A1: Two-way table of BSW voting intention and BSW rating
		tab bswrating bswvote
		
	
***** Policy positions
	* recode positions such that higher values correspond to right/nationalist/conservative positions
		
	*** Economic dimension
		* Redistribution
			fre t308d
			recode t308d (1=4 "right") (2=3) (3=2) (4=1) (5=0 "left"), gen(redistribution)
			
		* Taxes for the rich
			fre t308i
			recode t308i (1=4 "right") (2=3) (3=2) (4=1) (5=0 "left"), gen(richtax)
		
		* Taxes vs transfers
			fre t114
			recode t114 (1=10 "right") (2=9) (3=8) (4=7) (5=6) (6=5) (7=4) (8=3) (9=2) (10=1) (11=0  "left"), gen(TaxvTran)
		
	*** Morality dimension
		* Gay marriage
			fre t308r_2
			recode t308r_2 (1=0 "liberal") (2=1) (3=2) (4=3) (5=4 "authoritarian"), gen(marriage)

		* Abortion
			fre t308v
			recode t308v (1=0 "liberal") (2=1) (3=2) (4=3) (5=4 "authoritarian"), gen(abortion)

		* Gender equality
			fre t1036
			gen gndrequal = t1036-1
				label define gndrequal 0 "liberal" 10 "authoritarian"	
				label values gndrequal gndrequal
					
	*** Transnational dimension
		* Assimilation
			fre t308a
			recode t308a (1=0 "liberal") (2=1) (3=2) (4=3) (5=4 "authoritarian"), gen(assimilation)
	
		* Immigration
			fre t154
			gen migration = t154-1
				label values migration gndrequal
		
		* EU transfers
			fre t308e
			recode t308e (1=4 "authoritarian") (2=3) (3=2) (4=1) (5=0 "liberal"), gen(eutrans)
				
				
***** Factor analyses
	
	* separately for each dimension
	* Table 1. Measurement of policy dimensions in study I.
		*** Economic dimension
			pwcorr richtax redistribution TaxvTran [aweight=wei_mzz]
			factor richtax redistribution TaxvTran [aweight=wei_mzz], pcf
				predict econ_singlefac 	
				label variable econ_singlefac "economic dimension"

			* Redistribution narrowly
				factor redistribution richtax [aweight=wei_mzz], pcf
					rotate, promax		
					predict redistr_singlefac 
					label variable redistr_singlefac "redistribution dimension"				

		*** Transnational dimension
			pwcorr migration assimilation eutrans [aweight=wei_mzz]
			factor migration assimilation eutrans [aweight=wei_mzz], pcf
				predict glob_singlefac		
				label variable glob_singlefac "transnational dimension"
		
		*** Morality dimension
			pwcorr marriage abortion gndrequal [aweight=wei_mzz]
			factor marriage abortion gndrequal [aweight=wei_mzz], pcf
				predict morality_singlefac
				label variable morality_singlefac "morality dimension"
				
	* with all at once
		* economic dimension + transnational dimension + morality dimension
		* Table A2: Factor analysis with all items simultaneously included
		factor redistribution richtax TaxvTran migration assimilation eutrans marriage abortion gndrequal [aweight=wei_mzz], pcf
			rotate, promax blank(.3)
	
			* redistribution dimension + transnational dimension + morality dimension
			factor redistribution richtax migration assimilation eutrans marriage abortion gndrequal [aweight=wei_mzz], pcf
				rotate, promax blank(.3)
		
		* correlation between factors
		pwcorr econ_singlefac redistr_singlefac glob_singlefac morality_singlefac [aweight=wei_mzz]

			

***** Quadrants of the policy space (with zero as cut-off)
				
	*** Economic dimension + Transnational dimension
		gen quadrant_glob=1 if econ_singlefac>=0 & glob_singlefac>0
		replace quadrant_glob=2 if econ_singlefac<0 & glob_singlefac>0
		replace quadrant_glob=3 if econ_singlefac<0 & glob_singlefac<=0
		replace quadrant_glob=4 if econ_singlefac>=0 & glob_singlefac<=0
		replace quadrant_glob=. if econ_singlefac>=. | glob_singlefac>=.
		
		label variable quadrant_glob "Quadrant Econ v Transnational"	
		label define quadrant_glob 1 "right-nationalist" 2 "left-nationalist" 3 "left-cosmopolitan" 4 "right-cosmopolitan"
		label values quadrant_glob quadrant_glob
		
		recode quadrant_glob (2=1 "left-nationalist") (1 3 4=0 "other"), gen(leftnationalist)	
		label variable leftnationalist "Left-nationalist"		
				   
	*** Economic dimension + Morality dimension		
		gen quadrant_moral=1 if econ_singlefac>=0 & morality_singlefac>0
		replace quadrant_moral=2 if econ_singlefac<0 & morality_singlefac>0
		replace quadrant_moral=3 if econ_singlefac<0 & morality_singlefac<=0
		replace quadrant_moral=4 if econ_singlefac>=0 & morality_singlefac<=0
		replace quadrant_moral=. if econ_singlefac>=. | morality_singlefac>=.
					
		label variable quadrant_moral "Quadrant Econ v Morality"	
		label define quadrant_moral 1 "right-conservative" 2 "left-conservative" 3 "left-progressive" 4 "right-progressive"
		label values quadrant_moral quadrant_moral	
					
		recode quadrant_moral (2=1 "left-conservative") (1 3 4=0 "other"), gen(leftconservative)	
		label variable leftconservative "Left-conservative"		
				
		
***** Perceived party positions
	
		fre t153m 
		fre t113m
		fre t1035m 

		* by all 
		egen BSW_econ_mean=mean(-t113m+12)
		egen BSW_immigr_mean=mean(t153m)
		egen BSW_gndrequal_mean=mean(t1035m)

		egen CDU_econ_mean=mean(-t113b+12)
		egen CDU_immigr_mean=mean(t153b)
		egen CDU_gndrequal_mean=mean(t1035b)
		
		egen CSU_econ_mean=mean(-t113c+12)
		egen CSU_immigr_mean=mean(t153c)
		egen CSU_gndrequal_mean=mean(t1035c)
		
		egen SPD_econ_mean=mean(-t113d+12)
		egen SPD_immigr_mean=mean(t153d)	
		egen SPD_gndrequal_mean=mean(t1035d)	
		
		egen FDP_econ_mean=mean(-t113e+12)
		egen FDP_immigr_mean=mean(t153e)	
		egen FDP_gndrequal_mean=mean(t1035e)	
			
		egen GREEN_econ_mean=mean(-t113f+12)
		egen GREEN_immigr_mean=mean(t153f)		
		egen GREEN_gndrequal_mean=mean(t1035f)		
		
		egen LINKE_econ_mean=mean(-t113g+12)
		egen LINKE_immigr_mean=mean(t153g)	
		egen LINKE_gndrequal_mean=mean(t1035g)	
		
		egen AfD_econ_mean=mean(-t113h+12)
		egen AfD_immigr_mean=mean(t153h)	
		egen AfD_gndrequal_mean=mean(t1035h)	
		
		* by BSW voters
		egen BSW_econ_mean_bsw=mean(-t113m+12) if bswvote==1
		egen BSW_immigr_mean_bsw=mean(t153m) if bswvote==1
		egen BSW_gndrequal_mean_bsw=mean(t1035m) if bswvote==1

		egen CDU_econ_mean_bsw=mean(-t113b+12) if bswvote==1
		egen CDU_immigr_mean_bsw=mean(t153b) if bswvote==1
		egen CDU_gndrequal_mean_bsw=mean(t1035b) if bswvote==1
		
		egen CSU_econ_mean_bsw=mean(-t113c+12) if bswvote==1
		egen CSU_immigr_mean_bsw=mean(t153c) if bswvote==1
		egen CSU_gndrequal_mean_bsw=mean(t1035c) if bswvote==1
		
		egen SPD_econ_mean_bsw=mean(-t113d+12) if bswvote==1
		egen SPD_immigr_mean_bsw=mean(t153d) if bswvote==1	
		egen SPD_gndrequal_mean_bsw=mean(t1035d) if bswvote==1	
		
		egen FDP_econ_mean_bsw=mean(-t113e+12) if bswvote==1
		egen FDP_immigr_mean_bsw=mean(t153e) if bswvote==1	
		egen FDP_gndrequal_mean_bsw=mean(t1035e) if bswvote==1	
			
		egen GREEN_econ_mean_bsw=mean(-t113f+12) if bswvote==1
		egen GREEN_immigr_mean_bsw=mean(t153f) if bswvote==1		
		egen GREEN_gndrequal_mean_bsw=mean(t1035f) if bswvote==1		
		
		egen LINKE_econ_mean_bsw=mean(-t113g+12) if bswvote==1
		egen LINKE_immigr_mean_bsw=mean(t153g) if bswvote==1	
		egen LINKE_gndrequal_mean_bsw=mean(t1035g) if bswvote==1	
		
		egen AfD_econ_mean_bsw=mean(-t113h+12) if bswvote==1
		egen AfD_immigr_mean_bsw=mean(t153h) if bswvote==1	
		egen AfD_gndrequal_mean_bsw=mean(t1035h) if bswvote==1	
		
					
***** Other variables

	*** Gender
		fre t1
		recode t1 (1=1 "male") (2=0 "female"), gen(male)
		
	*** Eastern Germany
		fre ostwest
		recode ostwest (1=0 "west") (0=1 "east"), gen(east)	
		
	*** Age
		fre t2
		replace t2="1959" if t2=="1959 und frueher"
		destring t2, gen(birthyear)
		gen age=2024-birthyear
		
		recode age (1/29=0 "age: -29") (30/44=1 "age: 30-44") (45/59=2 "age: 45-59") (60/100=3 "age: 60+"), gen(agegroup)
			* check
			tab age agegroup
			
	*** Education
		fre t3
		recode t3 (1 2=0 "education: low") (3=1 "education: medium") (4 5=2 "education: high") (6 9=.), gen(education)	
	
	
	
**# Bookmark #3
*****************************************************************************************************
**** Descriptive evidence: Perceived party positions and voter positions in the policy space ********
*****************************************************************************************************	

****** Figure 2: Mean perceived party positions 
	* Economic vs. transnational
	twoway (scatter GREEN_immigr_mean GREEN_econ_mean, msize(medlarge) mlabcolor(green) mcolor(green)) ///
		   (scatter LINKE_immigr_mean LINKE_econ_mean, msize(medlarge) mlabcolor(purple) mcolor(purple)) ///
 		   (scatter SPD_immigr_mean SPD_econ_mean, msize(medlarge) mlabcolor(red) mcolor(red)) ///
		   (scatter BSW_immigr_mean BSW_econ_mean, msize(medlarge) mlabcolor(orange) mcolor(orange)) ///
		   (scatter CDU_immigr_mean CDU_econ_mean, msize(medlarge) mlabcolor(black) mcolor(black)) ///
 		   (scatter CSU_immigr_mean CSU_econ_mean, msize(medlarge) mlabcolor(gs8) mcolor(gs8)) ///
		   (scatter FDP_immigr_mean FDP_econ_mean, msize(medlarge) mlabcolor(gold) mcolor(gold)) ///
		   (scatter AfD_immigr_mean AfD_econ_mean, msize(medlarge) mlabcolor(blue) mcolor(blue)) ///
		   (scatter BSW_immigr_mean_bsw BSW_econ_mean_bsw, msize(medlarge) msymbol(oh) mlabcolor(orange) mcolor(orange)) ///
			, xline(6) yline(6) ///
			ylabel(1 "facilitate" 2 (1) 10 11 "restrict", gmin gmax angle(045)) ytitle("immigration") ///
			xlabel(1 "higher benefits" 2 (1) 10 11 "lower taxes", gmin gmax angle(045)) xtitle("welfare benefits vs. taxes") ///
			text(4.05 4.2 "Greens", color(green) size(vsmall)) ///
			text(4.9 5.7 "SPD", color(red) size(vsmall)) ///
			text(4.95 4.4 "LEFT", color(purple) size(vsmall)) ///
			text(5.86 7.2 "FDP", color(gold) size(vsmall)) ///
			text(6.75 7.0 "CDU", color(black) size(vsmall)) ///
			text(7.1 7.2 "CSU", color(gs8) size(vsmall)) ///
			text(6.65 5.3 "BSW", color(orange) size(vsmall)) ///
			text(7.75 4.4 "BSW (by its voters)", color(orange) size(vsmall)) ///
			text(9.57 7.95 "AfD", color(blue) size(vsmall)) ///
			legend(off) ///
			name(percpartypos1, replace)
		
	* Economic vs. morality
	twoway (scatter GREEN_gndrequal_mean GREEN_econ_mean, msize(medlarge) mlabcolor(green) mcolor(green)) ///
		   (scatter LINKE_gndrequal_mean LINKE_econ_mean, msize(medlarge) mlabcolor(purple) mcolor(purple)) ///
 		   (scatter SPD_gndrequal_mean SPD_econ_mean, msize(medlarge) mlabcolor(red) mcolor(red)) ///
		   (scatter BSW_gndrequal_mean BSW_econ_mean, msize(medlarge) mlabcolor(orange) mcolor(orange)) ///
		   (scatter CDU_gndrequal_mean CDU_econ_mean, msize(medlarge) mlabcolor(black) mcolor(black)) ///
 		   (scatter CSU_gndrequal_mean CSU_econ_mean, msize(medlarge) mlabcolor(gs8) mcolor(gs8)) ///
		   (scatter FDP_gndrequal_mean FDP_econ_mean, msize(medlarge) mlabcolor(gold) mcolor(gold)) ///   
		   (scatter AfD_gndrequal_mean AfD_econ_mean, msize(medlarge) mlabcolor(blue) mcolor(blue)) ///
		   (scatter BSW_gndrequal_mean_bsw BSW_econ_mean_bsw, msize(medlarge) msymbol(oh) mlabcolor(orange) mcolor(orange)) ///
			, xline(6) yline(6) ///
			ylabel(1 "not enough" 2 (1) 10 11 "too far", gmin gmax angle(045)) ytitle("gender equality measures") ///
			xlabel(1 "higher benefits" 2 (1) 10 11 "lower taxes", gmin gmax angle(045)) xtitle("welfare benefits vs. taxes") xsize(8) ///
			text(3.94 4.15 "Greens", color(green) size(vsmall)) ///
			text(4.7 5.7 "SPD", color(red) size(vsmall)) ///
			text(4.4 4.4 "LEFT", color(purple) size(vsmall)) ///
			text(5.85 7.2 "FDP", color(gold) size(vsmall)) ///
			text(6.05 5.95 "CDU", color(black) size(vsmall)) ///
			text(6.25 7.2 "CSU", color(gs8) size(vsmall)) ///
			text(5.45 5.3 "BSW", color(orange) size(vsmall)) ///
			text(5.09 4.4 "BSW (by its voters)", color(orange) size(vsmall)) ///
			text(7.66 7.95 "AfD", color(blue) size(vsmall)) ///
			legend(off) //////
			name(percpartypos2, replace) legend(off)
			
	graph combine percpartypos1 percpartypos2, row(1) iscale(*1.4) xsize(7) imargin(tiny) name(Figure2, replace)
		graph export Figure2.jpg, width(5000) replace	
		graph export Figure2.pdf, replace


****** Figure 3: Mean positions in the policy space by vote choice		
	*** Collapse data to party voter level
		svy: tab quadrant_glob bswvote, row
		svy: tab quadrant_moral bswvote, row
	
		preserve 
		
		collapse (mean) *singlefac [pweight=wei_mzz], by(Wahlabsicht_woothers)
		
		* Economic vs. transnational
		gen mlabvpos=3
		replace mlabvpos=9 if Wahlabsicht_woothers==4	
		
		twoway ////
			(scatter glob_singlefac econ_singlefac if Wahlabsicht_woothers==1, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(black) mcolor(black) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter glob_singlefac econ_singlefac if Wahlabsicht_woothers==4, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(red) mcolor(red) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter glob_singlefac econ_singlefac if Wahlabsicht_woothers==5, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(gold) mcolor(gold) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter glob_singlefac econ_singlefac if Wahlabsicht_woothers==6, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(green) mcolor(green) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter glob_singlefac econ_singlefac if Wahlabsicht_woothers==7, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(purple) mcolor(purple) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter glob_singlefac econ_singlefac if Wahlabsicht_woothers==322, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(blue) mcolor(blue) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter glob_singlefac econ_singlefac if Wahlabsicht_woothers==392, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(orange) mcolor(orange) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			, xline(0) yline(0) xlabel(-1 `""-1" "left""' -.5 (.5) .5 1 `""1" "right""', gmin gmax) ylabel(-1 `""cosmopolitan" ".1""' -.5 (.5) .5 1 `""nationalist" "1""', gmin gmax angle(090)) ysize(6) ///
			text(.75 -.6 "BSW vote share=13.8%", size(vsmall) color(orange)) text(.75 .75 "10.8%", size(vsmall) color(orange)) text(-.75 -.75 "10.1%", size(vsmall) color(orange)) text(-.75 .75 "5.0%", size(vsmall) color(orange)) ///
			xtitle("economic dimension") ytitle("transnational dimension") title(" ") legend(off) name(econvsglob, replace)
			
		* Economic vs. morality
		replace mlabvpos=6 if Wahlabsicht_woothers==5	
		replace mlabvpos=6 if Wahlabsicht_woothers==7	
				
		twoway ////
			(scatter morality_singlefac econ_singlefac if Wahlabsicht_woothers==1, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(black) mcolor(black) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter morality_singlefac econ_singlefac if Wahlabsicht_woothers==4, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(red) mcolor(red) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter morality_singlefac econ_singlefac if Wahlabsicht_woothers==5, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(gold) mcolor(gold) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter morality_singlefac econ_singlefac if Wahlabsicht_woothers==6, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(green) mcolor(green) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter morality_singlefac econ_singlefac if Wahlabsicht_woothers==7, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(purple) mcolor(purple) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter morality_singlefac econ_singlefac if Wahlabsicht_woothers==322, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(blue) mcolor(blue) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			(scatter morality_singlefac econ_singlefac if Wahlabsicht_woothers==392, ///
				mlabel(Wahlabsicht_woothers) mlabcolor(orange) mcolor(orange) mlabvpos(mlabvpos) mlabgap(1pt)) ///
			, xline(0) yline(0) xlabel(-1 `""-1" "left""' -.5 (.5) .5 1 `""1" "right""', gmin gmax) ylabel(-1 `""liberal" "-1""' -.5 (.5) .5 1 `""conservative" "1""', gmin gmax angle(090)) ysize(6) ///
			text(.75 -.6 "BSW vote share=9.0%", size(vsmall) color(orange)) text(.75 .75 "8.3%", size(vsmall) color(orange)) text(-.75 -.75 "14.5%", size(vsmall) color(orange)) text(-.75 .75 "7.9%", size(vsmall) color(orange)) ///
			xtitle("economic dimension") ytitle("morality dimension") title(" ") legend(off) name(econvsmorality, replace)				
				
		* Combine graphs
		graph combine econvsglob econvsmorality, iscale(*1.9) imargin(small) row(1) xsize(8) name(Figure3, replace)
			graph export Figure3.jpg, width(5000) replace	
			graph export Figure3.pdf, replace
				
		restore 
	

**# Bookmark #4
********************************************************************************
**************************** Main regression analysis **************************
********************************************************************************
	
		* standardize variables to range from zero to one
			foreach var of varlist econ_singlefac redistr_singlefac glob_singlefac morality_singlefac TaxvTran {
				sum `var'
				replace `var'=(`var'-r(min))/(r(max)-r(min))		
			}

			sum econ_singlefac redistr_singlefac glob_singlefac morality_singlefac TaxvTran
		
			label variable TaxvTran "taxes vs. transfers"

	*** Table A3: Bivariate correlations		
		pwcorr econ_singlefac redistr_singlefac TaxvTran glob_singlefac morality_singlefac bswvote bswrating [aweight=wei_mzz], star(0.001)

	
***** Table 2: Regression results for BSW support
		logit bswvote econ_singlefac glob_singlefac morality_singlefac i.male i.agegroup i.east i.education [pweight=wei_mzz]
		estadd fitstat
		eststo m1
		
			margins, dydx(*) post
			eststo m1_AME		
		
		logit bswvote redistr_singlefac TaxvTran glob_singlefac morality_singlefac i.male i.agegroup i.east i.education [pweight=wei_mzz]
		estadd fitstat
		eststo m2
		
			margins, dydx(*) post
			eststo m2_AME		
		
		reg bswrating c.econ_singlefac glob_singlefac morality_singlefac i.male i.agegroup i.east i.education [pweight=wei_mzz]
		eststo m3

		reg bswrating redistr_singlefac TaxvTran glob_singlefac morality_singlefac i.male i.agegroup i.east i.education [pweight=wei_mzz]
		eststo m4
	
		esttab m1 m1_AME m2 m2_AME m3 m4 using "Table2.rtf", b(a2) se(a2) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) ///
			nogaps r2 scalars(r2_mz) label order(econ_singlefac redistr_singlefac TaxvTran glob_singlefac morality_singlefac) replace			
	
	
***** Figure 3: Predicted probabilities of BSW vote intention across policy dimensions 
		estimates restore m1		 
		sum econ_singlefac glob_singlefac morality_singlefac if e(sample)
		
		margins, at(econ_singlefac=(0 (0.05) 1))
		marginsplot,  level(90) title(" ", size(zero)) ytitle("", size(zero))  ///
			recast(line) recastci(rarea) ///
			addplot(hist econ_singlefac if e(sample), percent yaxis(2) ///
			yscale(alt range(0 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			ylabel(0 (.1) .3, axis(1) gmin gmax) ///
			xlabel(0 `""0" "left""' .25 .5 .75 1 `""1" "right""', gmin gmax)) ///
			legend(off) ///
			name(econ, replace)
		
		margins, at(glob_singlefac=(0 (0.05) 1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero)) ///
			recast(line) recastci(rarea) ///
			addplot(hist glob_singlefac if e(sample), percent yaxis(2) yscale(alt range(0 100) axis(2)) ///
			yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			ylabel(0 (.1) .3, axis(1) gmin gmax) ///
			xlabel(0 `""0" "cosmopolitan""' .25 .5 .75 1 `""1" "nationalist""', gmin gmax)) legend(off) ///
			name(glob, replace)
		
		margins, at(morality_singlefac=(0 (0.05) 1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero)) ///
			recast(line) recastci(rarea) ///
			addplot(hist morality_singlefac if e(sample), percent yaxis(2) ///
			yscale(alt range(0 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			ylabel(0 (.1) .3, axis(1) gmin gmax) ///
			xlabel(0 `""0" "liberal""' .25 .5 .75 1 `""1" "conservative   ""', gmin gmax)) legend(off) ///
			name(morality, replace)
				
		sum glob_singlefac if e(sample), d
		
		margins, at(econ_singlefac=(0 (0.05) 1) glob_singlefac=(.2548811  1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero)) ///
			recast(line) recastci(rarea) ///
			addplot(hist econ_singlefac if e(sample), percent yaxis(2) ///
			yscale(alt range(0 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			ylabel(0 (.1) .3, axis(1) gmin gmax) ///
			xlabel(0 `""0" "left""' .25 .5 .75 1 `""1" "right""', gmin gmax)) legend(off) ///
			text(.22 0.5 "nationalist", size(small) color(orange)) ///
			text(-.006 0.5 "cosmopolitan", size(small) color(eltblue)) ///
			name(econ2, replace)		
		
		
		graph combine glob econ morality econ2, ycommon row(2) imargin(tiny) ysize(7.5) iscale(*1.2) name(Figure4, replace)
			graph export Figure4.jpg, width(5000) replace	
			graph export Figure4.pdf, replace



**# Bookmark #5
********************************************************************************
******************************* Robustness checks ******************************
********************************************************************************
			
			
**** Figure A1: Predicted probabilities of BSW vote intention across policy dimensions from model with an interaction between economic and transnational dimension 
		logit bswvote c.econ_singlefac##c.glob_singlefac morality_singlefac i.male i.agegroup i.east i.education [pweight=wei_mzz]
		sum econ_singlefac glob_singlefac morality_singlefac if e(sample)
		
		margins, at(econ_singlefac=(0 (0.05) 1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero))  ///
			recast(line) recastci(rarea) ///
			addplot(hist econ_singlefac if e(sample), percent yaxis(2) ///
			yscale(alt range(0 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			ylabel(0 (.1) .3, axis(1) gmin gmax) ///
			xlabel(0 `""0" "left""' .25 .5 .75 1 `""1" "right""', gmin gmax)) legend(off) ///
			name(econ, replace)
		
		margins, at(glob_singlefac=(0 (0.05) 1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero)) ///
			recast(line) recastci(rarea) ///
			addplot(hist glob_singlefac if e(sample), percent yaxis(2) /// 
			yscale(alt range(0 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			ylabel(0 (.1) .3, axis(1) gmin gmax) ///
			xlabel(0 `""0" "cosmopolitan""' .25 .5 .75 1 `""1" "nationalist""', gmin gmax)) legend(off) ///
			name(glob, replace)
		
		margins, at(morality_singlefac=(0 (0.05) 1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero)) ///
			recast(line) recastci(rarea) ///
			addplot(hist morality_singlefac if e(sample), percent yaxis(2) ///
			yscale(alt range(0 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			ylabel(0 (.1) .3, axis(1) gmin gmax) ///
			xlabel(0 `""0" "liberal""' .25 .5 .75 1 `""1" "conservative   ""', gmin gmax)) legend(off) ///
			name(morality, replace)
				
		sum glob_singlefac if e(sample), d
		
		margins, at(econ_singlefac=(0 (0.05) 1) glob_singlefac=(.2548811 1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero)) ///
			recast(line) recastci(rarea) ///
			addplot(hist econ_singlefac if e(sample), percent yaxis(2) ///
			yscale(alt range(-4 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			ylabel(0 (.1) .3, axis(1) gmin gmax) ///
			xlabel(0 `""0" "left""' .25 .5 .75 1 `""1" "right""', gmin gmax)) legend(off) ///
			text(.22 0.5 "nationalist", size(small) color(orange)) ///
			text(-.01 0.5 "cosmopolitan", size(small) color(eltblue)) ///
			name(econ2, replace)
		
		graph combine glob econ morality econ2, ycommon row(2) imargin(tiny) ysize(7.5) iscale(*1.2) name(FigureA1, replace)
		
		
		
***** Figure A2: Predicted BSW rating across policy dimensions 
				
		estimates restore m3		 
		sum econ_singlefac glob_singlefac morality_singlefac if e(sample)
		
		margins, at(econ_singlefac=(0 (0.05) 1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero))  ///
			recast(line) recastci(rarea) ///
			addplot(hist econ_singlefac if e(sample), percent yaxis(2) yscale(alt range(0 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			xlabel(0 `""0" "left""' .25 .5 .75 1 `""1" "right""', gmin gmax)) legend(off) ///
			name(econ, replace)
		
		margins, at(glob_singlefac=(0 (0.05) 1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero)) ///
			recast(line) recastci(rarea) ///
			addplot(hist glob_singlefac if e(sample), percent yaxis(2) yscale(alt range(0 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			xlabel(0 `""0" "cosmopolitan""' .25 .5 .75 1 `""1" "nationalist""', gmin gmax)) legend(off) ///
			name(glob, replace)
		
		margins, at(morality_singlefac=(0 (0.05) 1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero)) ///
			recast(line) recastci(rarea) ///
			addplot(hist morality_singlefac if e(sample), percent yaxis(2) yscale(alt range(0 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			xlabel(0 `""0" "liberal""' .25 .5 .75 1 `""1" "conservative   ""', gmin gmax)) legend(off) ///
			name(morality, replace)
				
		sum glob_singlefac if e(sample), d
		
		margins, at(econ_singlefac=(0 (0.05) 1) glob_singlefac=(.2996606  1))
		marginsplot, level(90) title(" ", size(zero)) ytitle("", size(zero)) ///
			recast(line) recastci(rarea) ///
			addplot(hist econ_singlefac if e(sample), percent yaxis(2) yscale(alt range(0 100) axis(2)) yscale(lstyle(none) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ///
			xlabel(0 `""0" "left""' .25 .5 .75 1 `""1" "right""', gmin gmax)) legend(off) ///
			text(-.24 0.75 "nationalist", size(small) color(orange)) ///
			text(-2.8 0.25 "cosmopolitan", size(small) color(eltblue)) ///
			name(econ2, replace)			

	graph combine glob econ morality econ2, ycommon row(2) imargin(tiny) ysize(7) iscale(*1.2) name(FigureA2, replace)

